package com.ruoyi.binance.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.binance.mapper.BinanceDingdingMessageMapper;
import com.ruoyi.binance.domain.BinanceDingdingMessage;
import com.ruoyi.binance.service.IBinanceDingdingMessageService;

/**
 * 钉钉通知Service业务层处理
 * 
 * @author zq
 * @date 2025-08-05
 */
@Service
public class BinanceDingdingMessageServiceImpl implements IBinanceDingdingMessageService 
{
    @Autowired
    private BinanceDingdingMessageMapper binanceDingdingMessageMapper;

    /**
     * 查询钉钉通知
     * 
     * @param id 钉钉通知主键
     * @return 钉钉通知
     */
    @Override
    public BinanceDingdingMessage selectBinanceDingdingMessageById(Long id)
    {
        return binanceDingdingMessageMapper.selectBinanceDingdingMessageById(id);
    }

    /**
     * 查询钉钉通知列表
     * 
     * @param binanceDingdingMessage 钉钉通知
     * @return 钉钉通知
     */
    @Override
    public List<BinanceDingdingMessage> selectBinanceDingdingMessageList(BinanceDingdingMessage binanceDingdingMessage)
    {
        return binanceDingdingMessageMapper.selectBinanceDingdingMessageList(binanceDingdingMessage);
    }

    /**
     * 新增钉钉通知
     * 
     * @param binanceDingdingMessage 钉钉通知
     * @return 结果
     */
    @Override
    public int insertBinanceDingdingMessage(BinanceDingdingMessage binanceDingdingMessage)
    {
        binanceDingdingMessage.setCreateTime(DateUtils.getNowDate());
        return binanceDingdingMessageMapper.insertBinanceDingdingMessage(binanceDingdingMessage);
    }

    /**
     * 修改钉钉通知
     * 
     * @param binanceDingdingMessage 钉钉通知
     * @return 结果
     */
    @Override
    public int updateBinanceDingdingMessage(BinanceDingdingMessage binanceDingdingMessage)
    {
        binanceDingdingMessage.setUpdateTime(DateUtils.getNowDate());
        return binanceDingdingMessageMapper.updateBinanceDingdingMessage(binanceDingdingMessage);
    }

    /**
     * 批量删除钉钉通知
     * 
     * @param ids 需要删除的钉钉通知主键
     * @return 结果
     */
    @Override
    public int deleteBinanceDingdingMessageByIds(Long[] ids)
    {
        return binanceDingdingMessageMapper.deleteBinanceDingdingMessageByIds(ids);
    }

    /**
     * 删除钉钉通知信息
     * 
     * @param id 钉钉通知主键
     * @return 结果
     */
    @Override
    public int deleteBinanceDingdingMessageById(Long id)
    {
        return binanceDingdingMessageMapper.deleteBinanceDingdingMessageById(id);
    }
}
